home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / docs / howto / server-info / mint.debug.me < prev    next >
Encoding:
Text File  |  1992-12-14  |  5.1 KB  |  146 lines

  1. .uh "How to Boot Mint"
  2. .pp
  3. I am ``Mint'', Sprite's root file server.  To boot after a power-up try
  4. .(l
  5. >b
  6. .)l
  7. To boot from disk.  If this hangs after printing the three numbers
  8. giving the size of the kernel then you have to power-cycle the machine.
  9. After a power-cycle Mint checks its memory for a while, and then
  10. goes into autoboot.  You have to jump on the break key immediately
  11. after it prints a message about passing self test
  12. to prevent it from booting from disk and hanging again.
  13. You may have to resort to a network boot from ginger:
  14. .(l
  15. >b ie(0,961c,43)sun3.new
  16. .)l
  17. To reboot when running Sprite, use the shutdown command:
  18. .(l
  19. % sync
  20. % shutdown -r
  21. .)l
  22. The 'sync' command writes out the cache, is isn't required unless
  23. you are paranoid.  Shutdown will sync the disks as the last thing before
  24. rebooting.
  25. shutdown -r reboots from disk, and seems to work reliably (no hangs.)
  26. To boot a kernel from ginger's /sprite3 file system:
  27. .(l
  28. % shutdown -R 'ie(0,961c,43)sun3.new'
  29. .)l
  30. .uh "Debugging Tips"
  31. .pp
  32. If Mint acts up then you might try the following things.
  33. If you aren't logged in, log in as root.
  34. Useful commands are:
  35. .(l
  36. mint # rpcstat -srvr
  37. .)l
  38. Which dumps out the status of all the RPC server processes.  If a bunch
  39. are ``busy'', and they remain busy with the same RPC ID and client, then
  40. there may be a deadlock.
  41. If they are all in the ``wait'' state it means that the Rpc_Daemon process
  42. is not doing rebinding for some reason.
  43. .(l
  44. mint # ps -a
  45. .)l
  46. This will tell you if any important daemons have died.
  47. If the ipServer is in the DEBUG state you can kill it and
  48. the daemons that depend on it with /hosts/mint/fixIPServer.
  49. This should also restart these daemons, but if it doesn't you
  50. can use /hosts/mint/restartservers.
  51. .(l
  52. % rpcecho -h \fIhostname\fP -n 1000
  53. .)l
  54. This program, which is found in /sprite/src/benchmarks/rpcecho,
  55. and may or may not be installed in /sprite/cmds,
  56. will tell you if there timeouts when using the RPC protocol to
  57. talk to another host.  If you suspect that a host with an Intel
  58. ethernet interface is flaking out, you can try this command.
  59. Lot's of timeouts indicate trouble.
  60. You can reset a host's network interface from its console with
  61. either of these keystrokes.
  62. .(l
  63. break-N
  64. Ll-N
  65. .)l
  66. On a regular Sun keyboard you use the L1 key like a shift key.
  67. On a regular ascii terminal, like Mint's console, you use the
  68. break key like escape - break then N.
  69. .uh "Kernel Debugging"
  70. .pp
  71. If Mint is so hung you can't explore with user commands,
  72. then the best you can do is sync the disks with:
  73. .(l
  74. break-W
  75. .)l
  76. This should print a message about queuing a call to sync the disks,
  77. and when it is done it should print a '.' and a newline.
  78. If you don't get the newline then Mint is deadlocked inside the
  79. file system cache, sigh.  Throw Mint into the debugger with:
  80. .(l
  81. break-D
  82. .)l
  83. If this drops you into the monitor (the '>' prompt), you can
  84. still get into the debugger by typing 'c' to the monitor.
  85. You may have to do this twice.  You should eventually get
  86. a message about ``Entering the debugger...''.
  87. .pp
  88. You have to run the debugger from Rosemary, unless there is a stand-alone
  89. Sprite machine available.  You can use Ginger's console to access rosemary.
  90. This is behind you, on top of Ginger, next to Allspice's monitor.
  91. You should verify that Mint is accessible by running
  92. .(l
  93. ginger% kmsg -v mint
  94. .)l
  95. This should return the kernel version that Mint is running.
  96. If this times-out then either Mint isn't in the debugger,
  97. or more likely, no one is responding to ARP requests for Mint's
  98. IP address.  Run the setup-arp script that is in ~sprite bin:
  99. .(l
  100. ginger% setup-arp
  101. .)l
  102. Now rlogin to Rosemary and run the Sprite kernel debugger.
  103. The kernel images should be copied to rosemary:/tmp/sprite
  104. or rosemary:/tmp/brent, and their version number should be
  105. evident in their name, e.g. sun3.1.065.  If not, you can run
  106. strings on the kernel images and grep for ``VERSION''.
  107. .(l
  108. rosemary% strings /tmp/sprite/sun3.sprite | egrep VERSION
  109. .)l
  110. To run the kernel debugger:
  111. .(l
  112. rosemary% cd /tmp/sprite
  113. rosemary% Gdb sun3.\fIversion\fP
  114. .)l
  115. If the RPC system seems to be the problem, you can dump the
  116. trace of recent RPCs by calling Rpc_PrintTrace(numRecs)
  117. .(l
  118. (kgdb) print Rpc_PrintTrace(50)
  119. .)l
  120. If there is a deadlock you can dump the process table:
  121. .(l
  122. (kgdb) print Proc_Dump()
  123. .)l
  124. You can switch from process to process and to stack backtraces
  125. by using the 'pid' command.  You only need to specify the last
  126. two hex digits of the process ID.  If you only have a decimal ID,
  127. then you have to type the whole thing.
  128. File system deadlocks center around locked handles, usually.
  129. When you find a process stuck in Fsutil_HandleFetch of Fsutil_HandleLock
  130. you can try to find the culprit by looking at the *hdrPtr these
  131. guys are waiting on.  There is a 'lockProcessID' in the hdrPtr that
  132. is really the address of a Proc_ControlBlock.  You can print this out
  133. with something like:
  134. .(l
  135. (kgdb) print *(Proc_ControlBlock *)(hdrPtr->lockProcessID)
  136. .)l
  137. You can reboot Mint from within kgdb with the reboot command.  With
  138. no arguments Mint will reboot from disk.
  139. .(l
  140. (kgdb) reboot
  141. (kgdb) reboot ie(0,961c,43)sun3.new
  142. .)l
  143. .uh "Modify date"
  144. .pp
  145. These notes were last updated by Fred Douglis on \*(td.
  146.